home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Toolbox
/
Visual Basic Toolbox (P.I.E.)(1996).ISO
/
animatn
/
t4diblib
/
animate3.f3_
/
animate3.f3
Wrap
Text File
|
1995-11-14
|
2KB
|
92 lines
VERSION 2.00
Begin Form Form1
Caption = "ANIMATE3"
ClientHeight = 1692
ClientLeft = 2628
ClientTop = 2688
ClientWidth = 2772
Height = 2112
Left = 2580
LinkTopic = "Form1"
ScaleHeight = 1692
ScaleWidth = 2772
Top = 2316
Width = 2868
Begin T4DILIB dilib1
Caption = "dilib1"
ControlMode = 0 'Lib -> PIC
Height = 372
Left = 1680
Top = 1200
Visible = 0 'False
Width = 972
End
Begin CommandButton Command1
Caption = "&Quit"
Height = 372
Left = 120
TabIndex = 0
Top = 1200
Width = 1452
End
Begin Image Image1
Height = 372
Left = 120
Stretch = -1 'True
Top = 120
Width = 972
End
End
Option Explicit
Declare Function GetFreeSpace& Lib "kernel" (ByVal x%)
Dim TimeIn!
Dim Frames%
Sub Command1_Click ()
Terminate
End Sub
Sub Form_Load ()
Dim loopctr%, memctr%
Dim imwidth!, imheight!, imhwratio!
top = (screen.Height - Height) / 2!
left = (screen.Width - Width) / 2!
dilib1.LibraryName = "bluespin.ilb"
dilib1.Action = IM_ACTION_OPENLIBRARY
Show
Form1.Refresh
TimeIn = Timer
For loopctr = 1 To 100
For memctr = 1 To dilib1.MemberCount
dilib1.MemberNumber = memctr
'Keep Image1.Width constant.
'Calculate how high image1 should be.
imwidth = dilib1.PixelWidth
imheight = dilib1.PixelHeight
imhwratio = imheight / imwidth
image1.Height = imhwratio * image1.Width
dilib1.Action = IM_ACTION_GETMEMBER
image1.Picture = dilib1.Picture
image1.Refresh
Frames = Frames + 1
Next memctr
DoEvents
Next loopctr
Terminate
End Sub
Sub Form_Unload (Cancel As Integer)
End
End Sub
Sub Terminate ()
Dim TimeOut!, TimeElapsed!, fps!
TimeOut = Timer
TimeElapsed = TimeOut - TimeIn
fps = Frames
fps = Frames / TimeElapsed
MsgBox Trim$(Str$(fps)) + " frames per second."
End
End Sub